<?php
/* @var $this Controller */
$this->beginWidget('bootstrap.widgets.TbBox', array(
	'title' => "项目属性 [$this->projectName]",
    'headerIcon' => 'icon-asterisk',
));
$this->widget('bootstrap.widgets.TbGridView', array(
	'type' => 'striped bordered condensed',
	'dataProvider' => $gridDataProvider,
	'template' => "{items}",
	'columns' => array(
		array('name' => 'name', 'header' => '字段名'),
		array('name' => 'type', 'header' => '字段类型', 'value' => 'Yii::app()->params["fieldType"][$data->type]'),
		array('name' => 'cutlen', 'header' => '截取长度', 'value' => '$data->cutlen=="0"?"":$data->cutlen'),
		array('name' => 'weight', 'header' => '权重'),
	),
));
$hasAccess = Yii::app()->user->hasAccess($this->projectName, 'project/change');
$this->widget('bootstrap.widgets.TbButton', array(
	'label' => '数据列表',
	'size' => 'large',
	'type' => 'primary',
	'url' => array('data/list'),
));
echo ' ';
$this->widget('bootstrap.widgets.TbButton', array(
	'label' => '更改索引结构',
	'size' => 'large',
	'buttonType' => $hasAccess ? 'link' : 'button',
	'disabled' => $hasAccess ? false : true,
	'url' => $hasAccess ? array('project/change') : 'javascript:;',
));
$this->endWidget();
